package io.xccit.train.member.config;

import io.xccit.train.common.interceptor.MemberInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author CH_ywx
 * @version 1.0
 * @create 2024/11/13
 * <p>会员模块web配置</p>
 */
@Configuration
public class MemberWebMvcConfig implements WebMvcConfigurer {

    @Autowired
    private MemberInterceptor memberInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(memberInterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/member/member/login", "/member/member/register","/member/member/sendCode");
    }
}
